use std::io;
use std::mem::size_of_val;

fn simple_data() {
    let i: i32 = 8i32;
    let i1: u8 = 3 ;
    let f: f32 = 0.8;
    let n: String = "hello".to_string();
    let n1: &'static str = "world";
    let c: char = 'H';
    let i3: usize = 33;
    let i4: isize = -9;
    let b: bool = true;
    let a: [i32;3] = [1,2,3];
    let s: &[i32]= &a[1..2];
    let t: (u8,char)=(1,'m');
    let nop: () =() ;
    println!("the size of char and bool val is {},{}",size_of_val(&c),size_of_val(&b));
    println!("the size of usize and array is {},{}",size_of_val(&i3),size_of_val(&a));
    println!("the size of nop and tuple is {},{}",size_of_val(&nop),size_of_val(&t));
    println!("the size of n and n1 and s is {},{},{}",size_of_val(&n),size_of_val(&n1),size_of_val(&s));
}

fn main() {
    simple_data();
}
    
